package com.servletspringboot.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

/**
 * 第二种创建servlet对象的方式(手动创建)
 */
public class ManuallyCreateServlet extends HttpServlet {

    @Override
    public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        System.out.println("手动创建servlet对象，并通过 ServletRegistrationBean对象来 注册该servlet");

        HttpSession session = req.getSession();
    }
}
